﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
/// <summary>
/// Summary description for OrderBus
/// </summary>
public class OrderBus
{
    public OrderDAL OrderDAL = new OrderDAL();

	public OrderBus()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public bool AddOrder(Order objO)
    {
        if (OrderDAL.InsertOrder(objO))
            return true;
        else
            return false;
    }
    public bool AddOrderItem(int OrderId, int ProductId,int quantity, decimal Money)
    {
        if (OrderDAL.InsertOrderItem(OrderId,ProductId,quantity,Money))
            return true;
        else
            return false;
    }

    public DataTable ReviewOrderInformation(String od_code)
    {
        return OrderDAL.GetOrderByCode(od_code);
    }
}